<?php
namespace app\index\model;

use app\common\model\Base;
class TiXian extends Base
{
	
	public function setTixianWithdraw($username,$ejmm,$bankren,$banksf,$bankno,$bankname,$banksq,$mobile,$qq,$bank_zhihang){
		$res = TiXian::name('username')
					->bind(['username'=>$username,'ejmm'=>$ejmm,'bankren'=>$bankren,'banksf'=>$banksf,'bankno'=>$bankno,'bankname'=>$bankname,'banksq'=>$banksq,'mobile'=>$mobile,'qq'=>$qq,'bank_zhihang'=>$bank_zhihang])
					->where(['username'=>':username'])
					->update(['ejmm'=>':ejmm','bankren'=>':bankren','banksf'=>':banksf','bankno'=>':bankno','bankname'=>':bankname','banksq'=>':banksq','mobile'=>':mobile','qq'=>':qq','bank_zhihang'=>':bank_zhihang']);	
		return $res;
	}
	
	public function setTixianJe($username,$txje,$zt,$ifck,$txtime,$txip,$nbzh,$txhje)
	{
		$res = TiXian::name('tixian_list')
					->bind(['username'=>$username,'txje'=>$txje,'zt'=>$zt,'ifck'=>$ifck,'txtime'=>$txtime,'txip'=>$txip,'nbzh'=>$nbzh,'txhje'=>$txhje])
					->insert(['username'=>':username','txje'=>':txje','zt'=>':zt','ifck'=>':ifck','txtime'=>':txtime','txip'=>':txip','nbzh'=>':nbzh','txhje'=>':txhje']);
		return $res;
	}
	public function setTixianSaveJe($username,$je)
	{
		$res = Tixian::name('username')
					->bind(['username'=>$username,'je'=>$je])
					->where(['username'=>':username'])
					->update(['je'=>':je']);
		return $res;
	}
}